<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@include file="../../mytags.jsp" %>
<t:base type="jquery"></t:base>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="webpage/com/wx/wx-plug-in/plugin/picker/css/mui.picker.all.css">
    <script type="text/javascript" src="webpage/com/wx/wx-plug-in/plugin/picker/js/mui.picker.all.js"></script>
    <title>${contact.name}</title>
    <style>
        .mui-input-row{
            border-radius: 0px;
        }
    </style>

</head>
<body>
<t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" action="" tiptype="tipType" validFormName="formValidName" showAllError="false">
    <div class="geren" style="font-weight: bold">
        <img src="${webRoot }/images/about.jpg">联系人信息
    </div>
    <input type="hidden" name="id" value="${ct.id}"/>
    <div class="mui-content" style=" margin: 0 auto;margin-top: 10px; width: 100%; padding: 0 15px;border-radius: 5px;">
        <form id='login-form' class="mui-input-group">
            <div class="mui-input-row mui-input-row1" style="padding-top:8px !important;">
                <label class="dg" style="width: 110px;">姓名 </label>
                <input id='name' name="name" value="${ct.name}" type="text" class="mui-input with-border" dataType="*" nullmsg="请输入姓名">
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">手机</label>
                <input id='cellphone1' name="cellphone1" value="${ct.cellphone1}" type="text" class="mui-input" readonly>
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">固话</label>
                <input id='telephone' name="telephone" value="${ct.telephone}" type="text" class="mui-input with-border" dataType="cPhone" ignore="ignore" errormsg="固话格式不正确">
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">传真</label>
                <input id='fax' type="text" name="fax" value="${ct.fax}" class="mui-input with-border" >
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">邮箱地址</label>
                <input id='email' name="email" value="${ct.email}" type="text" class="mui-input with-border" dataType="e" ignore="ignore">
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">职位</label>
                <t:dictSelect field="position" typeGroupCode="<%=StaticValue.DIC_CINEMA_DEPART %>"
                              defaultVal="${ct.position}"/>
            </div>
            <div class="mui-input-row mui-input-row1">
                <label class="dg" style="width: 110px;">状态</label>
                <t:dictSelect field="state" typeGroupCode="engineer_state" defaultVal="${ct.state}"/>
            </div>
        </form>
    </div>
    <div class="mui-clearfix"></div>
    <div class="mui-content-padded">
        <a class="mui-btn mui-btn-block mui-btn-primary" href="javascript:confirmEdit();">确定</a>
    </div>
</t:formvalid>
<%--<div class="eq1">
    <div class="inrr inrr1 inrr2">
        <h4><span>姓名</span>${contact.name}&nbsp;</h4>
        <h4><span></span>${contact.cellphone1}&nbsp;</h4>
        &lt;%&ndash;<h4><span>手机2</span>${contact.cellphone2}&nbsp;</h4>&ndash;%&gt;
        <h4><span></span> ${contact.telephone}&nbsp;</h4>
        <h4><span></span>${contact.fax}&nbsp;</h4>
        <h4><span></span>${contact.email}&nbsp;</h4>
        <h4><span></span>

            &nbsp;</h4>
        <h4><span></span>

            &nbsp;</h4>
    </div>
</div>--%>
</body>
<script type="text/javascript" charset="utf-8">
    mui.init();
    function tipType(msg,o,cssctl){
        if(o.type == 3){
            mui.toast(msg);
        }
    }
    function confirmEdit() {
        if(formValidName.check() == false){
            $('#formobj').submit();
        }else{
            $.post('zyContactsController.do?wxUpdate&'+$("#formobj").serialize(),{},function(data){
                data = $.parseJSON(data);
                if(data.success){
                    location.href.refresh();
                }else{
                    mui.alert(data.msg);
                }
            });
        }

    }
</script>
</html>